﻿using Abp.Runtime.Validation;
using Camc.Quality.Dto;
using Camc.Quality.ProductionPlan;
using System;
using System.Collections.Generic;
using System.Text;

namespace Camc.Quality.ProductionControl
{
    public class ProductionReport : PagedAndSortedInputDto, IShouldNormalize
    {
        /// <summary>
        /// 任务编号
        /// </summary>
        public string JobNumber { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string TechniqueName { get; set; }
        /// <summary>
        /// 工艺编号
        /// </summary>
        public string TechniqueNumber { get; set; }
        /// <summary>
        /// 工序名称
        /// </summary>
        public string ProcessesName { get; set; }

        /// <summary>
        /// 工步内容
        /// </summary>
        public string WorkStepName { get; set; }


        /// <summary>
        /// 计划开始时间
        /// </summary>
        public DateTime? StartTime { get; set; }
        /// <summary>
        /// 计划完成时间
        /// </summary>
        public DateTime?EndTime { get; set; }

        /// <summary>
        /// 装配班组描述
        /// </summary>
        public string OrganizationUnitDesc { get; set; }

        /// <summary>
        /// 装配人员描述
        /// </summary>
        public string UserName { get; set; }


        /// <summary>
        /// 计划状态
        /// </summary>
        public ProductingStatus? ProductingStatus { get; set; }

        /// <summary>
        /// 装配开始时间
        /// </summary>
        public DateTime? AssemblyStartTime { get; set; }
        /// <summary>
        /// 装配结束时间
        /// </summary>
        public DateTime? AssemblyEndTime { get; set; }

        public void Normalize()
        {
            if (string.IsNullOrEmpty(Sorting))
            {
                Sorting = "CreationTime Desc";
            }
        }

    }
}
